<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>在线鲜花销售网</title>
<meta name="keywords" content="鲜花，鲜花速递，鲜花网，花店，开业花篮" />
<meta name="description" content="各种鲜花礼品，应有尽有" />
<link href="images/xicon.png" rel="shortcut icon" type="image/x-icon" />
<link href="css/header.css" rel="stylesheet" type="text/css" />
<link href="css/order.css" rel="stylesheet" type="text/css" />
<link href="css/footer.css" rel="stylesheet" type="text/css" />
</head>

<body>
<!-- 顶部区域 -->
<header id="header">
	<!-- 顶部标题区域 -->
	<div class="htitle">
    	<a href="#" target="_blank" class="location">衡阳</a>
        
        <div class="header-info">
            <div class="login-info">
            	
            </div>
            
            <div class="person-info">
            	<span>|</span>
            	<a href="order.html" target="_blank">我的订单</a>
                <span>|</span>
                <a href="#" target="_blank">我的鲜花</a>
                <span>|</span>
                <a href="#" target="_blank">客户服务</a>
                <span>|</span>
           		<a href="#" target="_blank">个人信息</a>
            </div>
        
        </div>
    </div>
    
    <!-- 顶部搜索区域 -->
    <div class="search">
    	<div class="search_left">
    		<a href="index.html" title="首页">
            	<img src="images/logo.png" width="260px" height="120px"/> 
            </a>
        </div>
        
        <div class="search_right">
        	<div class="search_top">
                <div class="search_div">
                    <input type="search" class="search-ipt" placeholder="请输入要搜索的内容" />
                    <input type="button" class="search-btn"  onclick = "searchGoods()"/>  
                </div>
                <div class="buycart">
                	<i class="iconfont">0</i>
                    <a href="cart.html" target="_blank" onclick="toCart()">我的购物车</a>
                </div>
            </div>
            <!-- 根据种类搜索-->
            <div class="search_item" id="search_item">   
            </div>
        </div>
    </div>
</header>
     
<!-- 订单列表 -->
<div class="common_list_con clearfix" id="order_list">
    <ul class="goods_list_th clearfix">
        <li class="col01">商品名称</li>
        <li class="col03">商品单位</li>
        <li class="col03">商品价格</li>
        <li class="col02">数量</li>
        <li class="col03">小计</li>		
    </ul>
</div>
<div class="order_list_con" id="order_list">


</div>
        
<footer>
	<div class="fservice">
		<ul class="clearfix">
			<li>
				<span>
					<img src="images/f01.png" >
					<a href="#">热诚服务</a>
				</span>
			</li>
			<li><span><img src="images/f02.png" ><a href="#">客户信赖</a></span></li>
			<li><span><img src="images/f03.png" ><a href="#">时尚原创花艺</a></span></li>
			<li><span><img src="images/f04.png" ><a href="#">订单实拍</a></span></li>
			<li><span><img src="images/f05.png" ><a href="#">优惠多多</a></span></li>
			<li><span><img src="images/f06.png" ><a href="#">1小时配送</a></span></li>
			<li><span><img src="images/f07.png" ><a href="#">售后服务</a></span></li>
		</ul>
	</div>
	
	<div class="foot_link">
        <a href="#">关于我们</a> <span> | </span>
        <a href="#">联系我们</a> <span> | </span>
        <a href="#">招聘广告</a> <span> | </span>
        <a href="#">友情链接</a>
    </div>
    <p>CopyRight &copy; 2021 <a class="copy" href="#" target="_blank">点心思在线鲜花销售系统</a> All Rights Reserverd</p>
    <p>电话：0734-7572842 湘ICP备12345678号-1</p>
</footer>
<script src="js/jquery-3.4.1.min.js"></script>
<script src="js/checkLogin.js"></script>
<script type="text/javascript">
    let arr =["已取消","去支付","已支付","已发货","已收货","已退款"];

    $(function (){
        $.post("order",{
            op: "findAll"
        },function (data){
            let ono = '';
            let str = '';
            for( let i = 0; i < data.length; i++ ){
                if( ono == '' || ono != data[i].ono ){
                    str +=`<div class="order_title">
                            <span>订单号：${data[i].ono}</span><span>下单日期： ${data[i].odate}</span>
                            <span>订单总额：<b style="color:red">${data[i].totalPrice}</b> 元</span>
                            <a href="">${arr[data[i].status]}</a>
                            </div>
                            <ul class="goods_list_td clearfix">
                                <li class="col01">${i+1}</li>
                                <li class="col02"><img src="images/goods/${data[i].pics.split(";")[0].split("_")[1]}"></li>
                                <li class="col03">${data[i].gname}</li>
                                <li class="col04">${data[i].weight}/${data[i].unit}</li>
                                <li class="col04">${data[i].price}元</li>
                                <li class="col03">${data[i].nums}</li>
                                <li class="col04">${data[i].price * data[i].nums}元</li>
                            </ul>`;
                    ono = data[i].ono;
                }else{
                    str +=`<ul class="goods_list_td clearfix">
                                <li class="col01">${i+1}</li>
                                <li class="col02"><img src="images/goods/${data[i].pics.split(";")[0].split("_")[1]}"></li>
                                <li class="col03">${data[i].gname}</li>
                                <li class="col04">${data[i].weight}/${data[i].unit}</li>
                                <li class="col04">${data[i].price}元</li>
                                <li class="col03">${data[i].nums}</li>
                                <li class="col04">${data[i].price * data[i].nums}元</li>
                           </ul>`;
                }
            }
            $("#order_list").html( str );
        },"json")
    })
</script>
</body>
</html>
